#ifndef DEVICE_FILE_BROWSER_H
#define DEVICE_FILE_BROWSER_H

#include <QWidget>
#include "device_mdle.h"
#include "../../public_opt_subs/treeview_mdle/markdown_title_blck/QTreeViewMdTitle.h"
#include "../interface_mdle/fil_blck/interface_fil_master.h"
#include "../../MACRO.h"
namespace Ui {
class device_file_browser;
}

class device_file_browser : public device_mdle
{
    Q_OBJECT

public:
    explicit device_file_browser(QWidget *parent = nullptr);
    ~device_file_browser();

private slots:

    void itf_fil_save_slot(QStringList);
    void itf_fil_load_slot(QStringList);
    void itf_fil_list_slot(QStringList);

private:
    Ui::device_file_browser *ui;

    QTreeViewMdTitle * tree; //树状访问图
    QString file_work_dir; //工作 目录，用于缓存
    QString m_lastError; //错误信息
    bool copyFile(const QString &, const QString &);
    // --------------------------------------------
    // 增加IO
public:
    interface_fil_master * m_interface_fil; //注册文件主机
private slots:
    void wait_master_recv_slot(itf_fil);
};

#endif // DEVICE_FILE_BROWSER_H
